package com.jxmcloud.business.cut.service.user;

import com.jxmcloud.business.cut.dtoCommon.BagInfoDto;
import com.jxmcloud.business.cut.vo.user.PlayerInfoVo;

public interface IUserFlowService extends IUserService{
    boolean checkEventValid(PlayerInfoVo player, Integer nowStep, Integer checkEventId);        // 检测事件是否有效
    boolean runEvent(PlayerInfoVo player, Integer eventId);                                  // 执行事件
    boolean revertRunEvent(PlayerInfoVo player, Integer eventId);                                  // 回滚执行事件
    boolean enterNextProgress(PlayerInfoVo player, Integer progressId);                   // 进入下一步流程
    boolean revertEnterNextProgress(PlayerInfoVo player, Integer progressId);                   // 进入下一步流程
    BagInfoDto calcProgressAward(PlayerInfoVo player, Integer progressId);                   // 计算奖励
    boolean checkFlowEvent(PlayerInfoVo player, Integer envId);                              // 检测事件是否合理
    void refreshFlowData(PlayerInfoVo player);                                            // 刷新新的流程ID

    /**
     * 更新复活步骤ID
     * @param player
     * @param reviveStepId
     */
    void updateReviveStepId(PlayerInfoVo player, Integer reviveStepId);

    /**
     * 回到复活前步骤
     * @param player
     */
    void backToReviveStep(PlayerInfoVo player);

    /**
     * 重置流程
     * @param player
     */
    void resetFlow(PlayerInfoVo player);

    /**
     * 判断是否在复活流程中
     * @param player
     * @return
     */
    boolean isInRevive(PlayerInfoVo player);

    /**
     * 测试进入直播步骤的错误信息
     *
     * @param player
     * @return
     */
    String testEnterLiveStepErr(PlayerInfoVo player);
}
